cmake_minimum_required(VERSION 3.16)
project(IvEngine)

set(CMAKE_CXX_STANDARD 11)

file(GLOB_RECURSE PRJ_INC ${PROJECT_SOURCE_DIR}/src/*.h)
foreach(H_FULL_PATH ${PRJ_INC})
    message("found include file:${H_FULL_PATH}")
    STRING(REGEX MATCH ".*/" H_DIR_PATH ${H_FULL_PATH})
    message("add header path to include path: ${H_DIR_PATH}")
    include_directories(${H_DIR_PATH})
#    link_directories(${H_DIR_PATH})
endforeach(H_FULL_PATH ${PRJ_INC})


#file(GLOB TOP_SRC ${PROJECT_SOURCE_DIR}/*.cpp)
AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR} TOP_SRC)
file(GLOB_RECURSE SUB_SRC ${PROJECT_SOURCE_DIR}/src/*.cpp)
set(SRC ${TOP_SRC} ${SUB_SRC})

message("All Compile files:>>>>>>>>>>>")
foreach(s ${SRC})
    message("compile file:${s}" )
endforeach()


add_executable(${PROJECT_NAME} ${SRC})
target_link_libraries(${PROJECT_NAME}
        )
